<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Login</title>
    <link rel="stylesheet" href="static/bootstrap-5.3.0-alpha1-dist/css/bootstrap.css">
    <style>
        .login-box{
            margin-top: 100px;
            margin-left: auto;
            margin-right: auto;
            width: 400px;
            border: 2px solid #ddd;
            border-radius: 5px;
            padding: 0px 30px 30px 30px;
        }
        .login-box h1{
            text-align: center;
        }
    </style>
</head>

<body>
    <!--action为提交地址，不设置默认提交到当前页面地址-->
    <div class="login-box">
        <h1>用户登录</h1>
        <form method="post" action="/login">
            <div class="form-floating">
                  <select name="role" class="form-select" id="floatingSelect" aria-label="Floating label select example">
<!--                        <option selected></option>-->
                        <option value="1">管理员</option>
                        <option value="2">客户</option>
                  </select>
                  <label for="floatingSelect">选择登录身份</label>
            </div>
            <div class="mb-3" >
                <label for="exampleInputMobile" class="form-label">手机号：</label>
                <input type="text" name="mobile" placeholder="请输入手机号" class="form-control" id="exampleInputMobile" aria-describedby="emailHelp">
            </div>
            <div class="mb-3">
                <label for="Password" class="form-label">密码：</label>
                <input type="password" name="pwd" placeholder="请输入密码" class="form-control" id="Password">
            </div>
            <a href="/register" class="btn btn-outline-secondary">注册</a>
            <button type="submit" class="btn btn-outline-success">登录</button>
            <span style="color:red; ">{{ error }}</span>
        </form>
    </div>


    <script src="/static/bootstrap-5.3.0-alpha1-dist/js/bootstrap.js"></script>
</body>
</html>